package com.stu.wgt.test.bean;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author wgt
 * @since 2024-01-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "`order`")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private BigDecimal price;

    @TableField(value = "user_id")
    private Integer userId;

    @TableField(value = "product_id")
    private Integer productId;

    @TableField("merchant_id")
    private Integer merchantId;

    @TableField(value = "address_id")
    private Integer addressId;

    /**
     * 商品数量
     */
    private Integer quantity;
    /**
     * 付款方式
     */
    private String way;

    private String status;

    @TableField(value = "logistics_number")
    private String logisticsNumber;

    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField(value = "deliverydate")
    private Date deliveryDate;

    @TableField(exist = false)
    private Payment payment;

    @TableField(exist = false)
    private String productName;

    @TableField(exist = false)
    private String productUrl;

}
